define([],function(){
	var tpl = {};

	tpl.datatableForm = function(){
		var h = "";
		h += datatableForm();
		h += tpl_datatableForm_comm();
		h += tpl_datatableForm_comm1();
		h += tpl_datatableForm_comm2();
		h += datatableForm_1();
		h += datatableForm_2();
		h += datatableForm_3();
		h += datatableForm_4();
		h += datatableForm_5();
		h += datatableForm_6();
		h += datatableForm_7();
		h += datatableForm_serchBtn();
		return h;
	}
	tpl.datatableBox = function(){
		return datatableBox();
	}

	var datatableForm = function() {
		return 	'<script id="tpl_nutritionList_datatableForm" type="text/html">'+
				'		{{include "tpl_datatableForm_comm",value}}'+
				'	{{if kind=="1" || kind=="2" || kind=="3" || kind=="4"}}'+
				'		{{include "tpl_datatableForm_comm1",value}}'+
				'	{{else if kind=="5" || kind=="6" || kind=="7" || kind=="8"}}'+
				'		{{include "tpl_datatableForm_comm2",value}}'+
				'	{{/if}}'+
				'	{{if kind=="1"}}'+
				'		{{include "tpl_datatableForm_1",value}}'+
				'	{{else if kind=="2"}}'+
				'		{{include "tpl_datatableForm_2",value}}'+
				'	{{else if kind=="3"}}'+
				'		{{include "tpl_datatableForm_3",value}}'+
				'	{{else if kind=="4"}}'+
				'		{{include "tpl_datatableForm_4",value}}'+
				'	{{else if kind=="5"}}'+
				'		{{include "tpl_datatableForm_5",value}}'+
				'	{{else if kind=="6"}}'+
				'		{{include "tpl_datatableForm_6",value}}'+
				'	{{else if kind=="7"}}'+
				'		{{include "tpl_datatableForm_7",value}}'+
				'	{{else if kind=="8"}}'+
				'	{{/if}}'+
				'	{{include "tpl_datatableForm_serchBtn",value}}'+
				'</script>';
	}
	var tpl_datatableForm_comm = function(){
		return 	'<script id="tpl_datatableForm_comm" type="text/html">'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="hisNo" class="control-label">档案编号</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="hisNo" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label for="userName" class="control-label">姓名</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="userName" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="phoneNo" class="control-label">联系方式</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="phoneNo" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label for="gender" class="control-label">性别</label>'+
				'	    <div class="control-input radio">'+
				'	      	<label class="radio-inline"><input name="gender" type="radio" value="M">男</label>'+
				'	      	<label class="radio-inline"><input name="gender" type="radio" value="F">女</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label class="control-label">出生日期</label>'+
				'	    <div class="control-input clearfix">'+
				'			<div class="grid-range grid-range-time">'+
				'		      	<input name="beginDate" type="date" class="form-control">'+
				'		    </div>'+
				'			<div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-time">'+
				'		      	<input name="endDate" type="date" class="form-control">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var tpl_datatableForm_comm1 = function() {
		return 	'<script id="tpl_datatableForm_comm1" type="text/html">'+
				'	<div class="dt-card form-group grid-label-6">'+
				'	    <label class="control-label">开始管理时间</label>'+
				'	    <div class="control-input clearfix">'+
				'			<div class="grid-range grid-range-time">'+
				'		      	<input name="manageBeginDate" type="date" class="form-control">'+
				'		    </div>'+
				'			<div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-time">'+
				'		      	<input name="manageEndDate" type="date" class="form-control">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="currentStatus" class="control-label">目前状态</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="currentStatus" name="currentStatus" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      		<option value="1">痊愈</option>'+
				'	      		<option value="2">好转</option>'+
				'	      		<option value="3">转院</option>'+
				'	      		<option value="4">失访</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var tpl_datatableForm_comm2 = function() {
		return 	'<script id="tpl_datatableForm_comm2" type="text/html">'+
				'	<div class="dt-card form-group grid-label-6">'+
				'	    <label class="control-label">起始阶段查询</label>'+
				'	    <div class="control-input clearfix">'+
				'			<div class="grid-range grid-range-time">'+
				'				<select id="seqFrom" name="seqFrom" class="form-control">'+
				'					<option value="">全部</option>'+
				'				</select>'+
				'		    </div>'+
				'			<div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-time">'+
				'		      	<select id="seqTo" name ="seqTo" class="form-control">'+
				'					<option value="">全部</option>'+
				'				</select>'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-6">'+
				'	    <label class="control-label">体检完成次数</label>'+
				'	    <div class="control-input clearfix">'+
				'		    <div class="grid-range">'+
				'		      	<input name="checkFrom" type="text" class="form-control" placeholder="次">'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="checkTo" type="text" class="form-control" placeholder="次">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label class="control-label">失访次数</label>'+
				'	    <div class="control-input clearfix">'+
				'		    <div class="grid-range">'+
				'		      	<input name="lostFrom" type="text" class="form-control" placeholder="次">'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="lostTo" type="text" class="form-control" placeholder="次">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="heath" class="control-label">健康情况</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="heath" name="heath" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label for="createAuthor" class="control-label">录入者</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="createAuthor" name="createAuthor" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_1 = function() {
		return 	'<script id="tpl_datatableForm_1" type="text/html">'+
				'	<div class="dt-card form-group grid-label-8">'+
				'	    <label for="foodConversionAge" class="control-label">开始食物转换年龄</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="foodConversionAge" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label for="birthHistorys" class="control-label">出生史</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="birthHistorys" type="checkbox" value="1">早产</label>'+
				'	      	<label class="checkbox-inline"><input name="birthHistorys" type="checkbox" value="2">低出生体重</label>'+
				'	      	<label class="checkbox-inline"><input name="birthHistorys" type="checkbox" value="3">多胎</label>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_2 = function() {
		return 	'<script id="tpl_datatableForm_2" type="text/html">'+
				'	<div class="dt-card form-group grid-label-10">'+
				'	    <label for="foodIronAge" class="control-label">儿童添加含铁食物年龄</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="foodIronAge" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-6">'+
				'	    <label for="breastfeeding" class="control-label">母乳喂养情况</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="breastfeeding" name="breastfeeding" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      		<option value="1">纯母乳</option>'+
				'	      		<option value="2">部分母乳</option>'+
				'	      		<option value="3">配方奶</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-6">'+
				'	    <label for="isIron" class="control-label">是否铁剂治疗</label>'+
				'	    <div class="control-input radio">'+
				'	      	<label class="radio-inline"><input name="isIron" type="radio" value="1">是</label>'+
				'	      	<label class="radio-inline"><input name="isIron" type="radio" value="0">否</label>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_3 = function() {
		return 	'<script id="tpl_datatableForm_3" type="text/html">'+
				'	<div class="dt-card form-group grid-label-8">'+
				'	    <label for="isVitd" class="control-label">儿童是否服用Vitd</label>'+
				'	    <div class="control-input radio">'+
				'	      	<label class="radio-inline"><input name="isVitd" type="radio" value="1">是</label>'+
				'	      	<label class="radio-inline"><input name="isVitd" type="radio" value="0">否</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label for="signs" class="control-label">体征</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="1">方颅</label>'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="2">肋骨串珠</label>'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="3">肋软骨沟</label>'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="4">鸡胸</label>'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="5">手(足)镯</label>'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="6">X型腿</label>'+
				'	      	<label class="checkbox-inline"><input name="signs" type="checkbox" value="7">O型腿</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label for="bloodCalcium" class="control-label">血钙</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="bloodCalcium" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label for="bloodPhosphorus" class="control-label">血磷</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="bloodPhosphorus" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label for="bloodAKP" class="control-label">血AKP</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="bloodAKP" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-6">'+
				'	    <label for="bloodOHD" class="control-label">血25-(OH)D</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="bloodOHD" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_4 = function() {
		return 	'<script id="tpl_datatableForm_4" type="text/html">'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="obesityScore" class="control-label">肥胖分度</label>'+
				'	    <div class="control-input radio">'+
				'	      	<label class="radio-inline"><input name="obesityScore" type="radio" value="1">超重</label>'+
				'	      	<label class="radio-inline"><input name="obesityScore" type="radio" value="2">肥胖</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="obesityReason" class="control-label">肥胖原因</label>'+
				'	    <div class="control-input radio">'+
				'	      	<label class="radio-inline"><input name="obesityReason" type="radio" value="1">饮食结构</label>'+
				'	      	<label class="radio-inline"><input name="obesityReason" type="radio" value="2">运动量过低</label>'+
				'	      	<label class="radio-inline"><input name="obesityReason" type="radio" value="3">内分泌遗传</label>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_5 = function() {
		return 	'<script id="tpl_datatableForm_5" type="text/html">'+
				'	<div class="dt-card form-group grid-label-7">'+
				'	    <label for="highRiskReasons" class="control-label">高危因素原因：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="highRiskReasons" type="checkbox" value="1">重症监护儿童</label>'+
				'	      	<label class="checkbox-inline"><input name="highRiskReasons" type="checkbox" value="2">遗传性家族史</label>'+
				'	      	<label class="checkbox-inline"><input name="highRiskReasons" type="checkbox" value="3">宫内感染</label>'+
				'	      	<label class="checkbox-inline"><input name="highRiskReasons" type="checkbox" value="4">颅面形态畸形</label>'+
				'	      	<label class="checkbox-inline"><input name="highRiskReasons" type="checkbox" value="5">大面积颜面血管瘤</label>'+
				'	      	<label class="checkbox-inline"><input name="highRiskReasons" type="checkbox" value="6">难产/器械助产</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="eyeAppearance" class="control-label">眼外观：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="eyeAppearance" type="checkbox" value="1">眼睑缺损</label>'+
				'	      	<label class="checkbox-inline"><input name="eyeAppearance" type="checkbox" value="2">炎症</label>'+
				'	      	<label class="checkbox-inline"><input name="eyeAppearance" type="checkbox" value="3">肿物</label>'+
				'	      	<label class="checkbox-inline"><input name="eyeAppearance" type="checkbox" value="4">睫毛外翻</label>'+
				'	      	<label class="checkbox-inline"><input name="eyeAppearance" type="checkbox" value="5">两眼大小不对称</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label for="conjunctiva" class="control-label">结膜：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="conjunctiva" type="checkbox" value="1">充血</label>'+
				'	      	<label class="checkbox-inline"><input name="conjunctiva" type="checkbox" value="2">分泌物</label>'+
				'	      	<label class="checkbox-inline"><input name="conjunctiva" type="checkbox" value="3">持续溢泪</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label for="pupil" class="control-label">瞳孔：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="pupil" type="checkbox" value="1">未居中</label>'+
				'	      	<label class="checkbox-inline"><input name="pupil" type="checkbox" value="2">非对称</label>'+
				'	      	<label class="checkbox-inline"><input name="pupil" type="checkbox" value="3">黑色外观</label>'+
				'	      	<label class="checkbox-inline"><input name="pupil" type="checkbox" value="4">非圆形</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="leftVision" class="control-label">左眼视力</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="leftVision" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="rightVision" class="control-label">右眼视力</label>'+
				'	    <div class="control-input">'+
				'	      	<input name="rightVision" type="text" class="form-control" placeholder="">'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_6 = function() {
		return 	'<script id="tpl_datatableForm_6" type="text/html">'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="auricularAppearances" class="control-label">耳外观：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="auricularAppearances" type="checkbox" value="1">耳外畸形</label>'+
				'	      	<label class="checkbox-inline"><input name="auricularAppearances" type="checkbox" value="2">外耳道异常分泌物</label>'+
				'	      	<label class="checkbox-inline"><input name="auricularAppearances" type="checkbox" value="2">外耳湿疹</label>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_7 = function() {
		return 	'<script id="tpl_datatableForm_7" type="text/html">'+
				'	<div class="dt-card form-group grid-label-5">'+
				'	    <label for="dentalCaries" class="control-label">龋齿检查：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="dentalCaries" type="checkbox" value="1">牙齿黑褐色</label>'+
				'	      	<label class="checkbox-inline"><input name="dentalCaries" type="checkbox" value="2">牙齿龋洞</label>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-5">'+
				'	    <label for="dentalExaminations" class="control-label">牙齿检查：</label>'+
				'	    <div class="control-input checkbox">'+
				'	      	<label class="checkbox-inline"><input name="dentalExaminations" type="checkbox" value="1">乳牙早萌</label>'+
				'	      	<label class="checkbox-inline"><input name="dentalExaminations" type="checkbox" value="2">乳牙滞留</label>'+
				'	      	<label class="checkbox-inline"><input name="dentalExaminations" type="checkbox" value="3">乳牙反咬和</label>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	
	var datatableForm_serchBtn = function() {
		return 	'<script id="tpl_datatableForm_serchBtn" type="text/html">'+
				'	<div class="dt-card form-group">'+
				'	      <button type="button" class="btn btn-info" id="serchBtn">搜索</button>'+
				'	</div>'+
				'</script>';
	}
	var datatableBox = function() {
		return 	'<script id="tpl_nutritionList_datatableBox" type="text/html">'+
				'		 <th>档案编号</th>'+
                '        <th>姓名</th>'+
                '        <th>性别</th>'+
                '        <th>联系方式</th>'+
                '        <th>出生日期</th>'+
                '	{{if kind=="1" || kind=="2" || kind=="3" || kind=="4"}}'+
                '        <th>开始管理时间</th>'+
                '	{{else if kind=="5" || kind=="6" || kind=="7" || kind=="8"}}'+
                '        <th>筛查进度</th>'+
                '	{{/if}}'+
				'	{{if kind=="1"}}'+
                '        <th>开始食物转换年龄</th>'+
                '	{{else if kind=="2"}}'+
                '        <th>母乳喂养情况</th>'+
                '        <th>铁剂治疗</th>'+
                '	{{else if kind=="3"}}'+
                '        <th>血钙</th>'+
                '        <th>血磷</th>'+
                '        <th>血AKP</th>'+
                '        <th>血25-(OH)D</th>'+
                '        <th>服用Vitd</th>'+
                '        <th>体征</th>'+
                '	{{else if kind=="4"}}'+
                '        <th>肥胖分度</th>'+
                '        <th>肥胖原因</th>'+
                '	{{else if kind=="5"}}'+
                '        <th>左眼视力</th>'+
                '        <th>右眼视力</th>'+
                '	{{else if kind=="6"}}'+
                '        <th>耳外观</th>'+
                '	{{else if kind=="7"}}'+
                '        <th>龋齿检查</th>'+
                '        <th>牙齿检查</th>'+
                '	{{else if kind=="8"}}'+
                '	{{/if}}'+
                '        <th>操作</th>'+
				'</script>';
	}

	return tpl;
});